package com.jia.train.global.response;

import lombok.Data;
import org.springframework.http.HttpStatus;

@Data
public class BaseResponse<T> {

    private Integer code;

    private String message;

    private T data;

    private boolean success = true;

    public BaseResponse() {
    }

    public BaseResponse(boolean success) {
        this.success = success;
    }

    public BaseResponse(T data) {
        this.code = HttpStatus.OK.value();
        this.data = data;
    }


}
